package com.css.zfzx.sjcj.modules.hddcB7_VolcanicDataTable.repository;

import com.css.zfzx.sjcj.modules.hddcB7_VolcanicDataTable.repository.entity.HddcB7VolcanicdatatableEntity;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

/**
 * @author zhangcong
 * @date 2020-11-26
 */
public interface HddcB7VolcanicdatatableRepository extends JpaRepository<HddcB7VolcanicdatatableEntity, String> {
    @Query(nativeQuery = true, value = "select * from hddc_b7_volcanicdatatable where is_valid !=0 and project_name in :projectIds")
    List<HddcB7VolcanicdatatableEntity> queryB7VolcanicdatatableByProjectId(List<String> projectIds);

    @Query(nativeQuery = true, value = "select * from hddc_b7_volcanicdatatable where is_valid !=0 and task_name in :taskIds")
    List<HddcB7VolcanicdatatableEntity> queryHddcB7VolcanicdatatableByTaskId(List<String> taskIds);
}
